Skip to content

Conversation

@emilk
Copy link
Contributor

@emilk emilk commented Aug 28, 2023

Hi, and thanks for your work on egui_commonmark!

In this PR I've added support for showing image loading errors to the user:

image

To implement this I added a dependency on the poll-promise crate. An added benefit is that we can also show a loading spinner while an image is being downloaded:

image

I also changed the Mutex to the one from parking_lot. egui already depends on parking_lot, so it is no added dependency, and it is much more ergonomic (no need for .unwrap() everywhere).

I split the code in a few files - hope that's ok.

Copy link
Owner

@lampsitter lampsitter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! It looks great.
I'm on board with the added dependencies.

The only thing that is a little bit annoying is that poll-promise always pulls in the document-features crate, but it's not a show stopper.

I will approve after the typo fix 😃

@emilk emilk requested a review from lampsitter August 28, 2023 21:04
@lampsitter lampsitter merged commit af015df into lampsitter:master Aug 29, 2023
@lampsitter
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants